package com.yitiao.designmodel.create.singleton;

public class Singleton {
    private static Singleton instance;

    public Singleton() {
    }

    public static Singleton getInstance(){
        if (instance!=null){
            return instance;
        }
        synchronized (Singleton.class){
            if (instance==null){
                instance = new Singleton();
            }
        }
        return instance;
    }

}
